home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
amiga
/
macromkr
/
adpromac.lha
/
$FREAK.adpro
< prev
next >
Wrap
Text File
|
1993-07-27
|
3KB
|
121 lines
/*
THIS MACRO PROCESSES AN IMAGE SEQUENCE TO LOOK LIKE A MOVING
FRESCO. WRITTEN BY DANIEL H. BERNARD
COPYRITE 1993
*/
address "ADPro"
options results
GETFILE '"Name of Sequence"' 'EH0:'
TheFile = adpro_result
np = index(TheFile,"000")
say np
TheFile = left(TheFile,np-1)
getnumber '"Number of Frames To Process"' 1 1 9999
nof=adpro_result
SFORMAT "IFF"
DO fn = 1 TO nof
if fn < 10 then LoadFile = Thefile||"000"||fn
else if fn > 9 & fn < 100 then LoadFile = TheFile||"00"||fn
else LoadFile = TheFile||"0"||fn
say loadfile
lformat "UNIVERSAL"
load LoadFile
OFORMAT
oldOp = ADPRO_RESULT
IF( ~EXISTS( "adpro:convolutions/WoodCut" )) THEN DO
ADPRO_TO_FRONT
OKAY1 "The convolution WoodCut," || NL ||,
"cannot be found."
EXIT 10
END
IMAGE_TYPE
ImageType = ADPRO_RESULT
IF( WORD( ImageType, 1 ) = "NONE" ) THEN DO
ADPRO_TO_FRONT
OKAY1 "There is currently no image" || NL ||,
"in ADPro's buffer. An image" || NL ||,
"is required for this operator."
EXIT 10
END
IF( WORD( ImageType, 1 ) = "BITPLANE" ) THEN DO
/*
** There's no raw data, but there is rendered data.
** The user must want us to modify the rendered data.
*/
OPERATOR "RENDERED_TO_RAW"
IF( RC ~= 0 ) THEN DO
ADPRO_TO_FRONT
OKAY1 "Converting rendered to raw failed."
OFORMAT oldOp
EXIT 10
END
END
/*
** Fresco the image.
*/
DO
OPERATOR "BLUR" 0 0
IF( RC ~= 0 ) THEN DO
ADPRO_TO_FRONT
OKAY1 "The operator BLUR," || NL ||,
"failed to execute."
OFORMAT oldOp
EXIT 10
END
OPERATOR "DISPLACE_PIXEL" 2 100 0
IF( RC ~= 0 ) THEN DO
ADPRO_TO_FRONT
OKAY1 "The operator DISPLACE_PIXEL," || NL ||,
"failed to execute."
OFORMAT oldOp
EXIT 10
END
OPERATOR "MEDIAN_FILTER" 0
IF( RC ~= 0 ) THEN DO
ADPRO_TO_FRONT
OKAY1 "The operator MEDIAN_FILTER," || NL ||,
"failed to execute."
OFORMAT oldOp
EXIT 10
END
END
OPERATOR "CONVOLVE" "adpro:convolutions/WoodCut" 100 0
IF( RC ~= 0 ) THEN DO
ADPRO_TO_FRONT
OKAY1 "The operator CONVOLVE," || NL ||,
"failed to execute."
OFORMAT oldOp
EXIT 10
END
OFORMAT oldOp
SAVE Loadfile "RAW"
END
exit